﻿using LuShanTea.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;


namespace LuShanTea.IService
{
    public interface IOrderService : IServiceSupport
    {
        long AddNew(OrderAddNewDTO orderAddNewDTO);

        void MarkDeleted(long orderId);

        void UpdateOrder(OrderDTO orderDTO);

        long GetTotalCount();

        OrderDTO GetById(long orderId);

        OrderDTO[] GetPageDataOrder(int pageSize, int pageIndex);

        OrderDTO[] GetPageDataOrderByUserId(long userId, int pageSize, int currentIndex);


        /// <summary>
        /// 获取用户day天的订单
        /// </summary>
        /// <param name="userId">；用户Id</param>
        /// <param name="day">天数</param>
        /// <returns></returns>
        OrderDTO[] GetUserOrderToDay(long userId, int day);

        long GetCountByUser(long userId, long? statusId);

        bool IsAnyOrderByUser(long userId, long orderId);

        /// <summary>
        /// 获取今日已完成的订单
        /// </summary>
        /// <returns></returns>
        long GetCountByDay();
    }
}
